package com.sport.user.controller;

import com.sport.model.common.dtos.ResponseResult;
import com.sport.model.user.dtos.AccountUserDto;

import com.sport.user.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/loading")
public class LoginController {

    @Autowired
    LoginService loginService;

    @PostMapping("/login")
    public ResponseResult login(@Validated @RequestBody AccountUserDto accountUserDto){
        return loginService.login(accountUserDto);
    }
}
